<div class="row m-n">
    <div tabset type="tab">
        <div tab heading="客户列表" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-6 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addData()" ng-disabled="!btnPermission.clientAdd"
                        translate translate-attr-title="{{!btnPermission.clientAdd?'无权限执行此操作':''}}">新增</button>
                    <button class="btn btn-operate m-r-sm" ng-click="synCRMClient()"
                        ng-disabled="!btnPermission.clientSynCRM"
                        translate translate-attr-title="{{!btnPermission.clientSynCRM?'无权限执行此操作':''}}">同步CRM</button>
                    <button class="btn btn-operate m-r-sm" ng-click="bound()" ng-disabled="!btnPermission.clientBound"
                        translate translate-attr-title="{{!btnPermission.clientBound?'无权限执行此操作':''}}">绑定</button>
                    <button class="btn btn-operate m-r-sm" ng-click="delData('batch')"
                        ng-disabled="!btnPermission.clientDel"
                        translate translate-attr-title="{{!btnPermission.clientDel?'无权限执行此操作':''}}">删除</button>
                    <button class="btn btn-operate m-r-sm" ng-click="updateCRM()"
                        ng-disabled="!btnPermission.clientUpdate"
                        translate translate-attr-title="{{!btnPermission.clientUpdate?'无权限执行此操作':''}}">更新SAP</button>
                    <button class="btn btn-operate m-r-sm" ng-click="importDealer()"
                        ng-disabled="!btnPermission.clientImport"
                        translate translate-attr-title="{{!btnPermission.clientImport?'无权限执行此操作':''}}">导入客户</button>
                    <button class="btn btn-operate m-r-sm" ng-click="importVeh()" ng-disabled="!btnPermission.clientAdd"
                        translate translate-attr-title="{{!btnPermission.clientAdd?'无权限执行此操作':''}}">导入车辆</button>

                    <button class="btn btn-operate m-r-sm" ng-click="importClientMaterials()">导入客户零件</button>
                </div>
                <div class="search-bar wrapper-none col-xs-6">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列" ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color">
                            <div translate translate-attr-title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.dealerVehiclesExportUrl"
                                    download-param="condition">
                                    <i class="yb-icon ico-export-o"></i> <span translate>导出客户车辆</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" translate-attr-title="高级搜索" translate="高级搜索more" ng-click="switchToolbar('AdvanceSearch')"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="客户名称" ng-model="condition.companyName">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>客户名称</span>：</label>
                        <input type="text" name="dealerCode" ng-model="condition.companyName" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>客户编号</span>：</label>
                        <input type="text" name="dealerCode" ng-model="condition.dealerCode" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>简称</span>：</label>
                        <input type="text" name="shortName" ng-model="condition.shortName" class="form-control">
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="true"
                has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll()"></div>
                                    </th>
                                    <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-click="toSort(tbConf.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth"
                                            fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-click="toSort(tbConf.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-style="tbStyle.scrollLeftWidth">
                        <table class="table-fixed border-none">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)">
                                        </div>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button class="btn btn-operate m-r-xs" ng-click="editData(item)"
                                                ng-disabled="!btnPermission.clientEdit"
                                                translate translate-attr-title="{{!btnPermission.clientEdit?'无权限执行此操作':''}}">编辑</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="delData('single', item.id)"
                                                ng-disabled="!btnPermission.clientDel || (isWJ && !!item.platOrgId)"
                                                translate translate-attr-title="{{!btnPermission.clientDel?'无权限执行此操作':''}}">删除</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="invite(item.id)"
                                                ng-disabled="item.isPlatCompany||item.applyStatus == 3 || !btnPermission.clientInvite"
                                                translate translate-attr-title="{{!btnPermission.clientInvite?'无权限执行此操作':''}}">邀请</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="receiveInfoList(item)"
                                                ng-disabled="!btnPermission.clientReceiveInfo"
                                                translate translate-attr-title="{{!btnPermission.clientReceiveInfo?'无权限执行此操作':''}}">收货地址</button>

                                            <button class="btn btn-operate m-r-xs" ng-click="maintenVeh(item)" translate>维护车辆</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="viewClientMaterials(item)" translate>查看零件</button>
                                            <button class="btn btn-operate m-r-sm" ng-click="restAdminPwd(item)" translate ng-if="isWJ && !!item.platOrgId">重置超管密码</button>
                                            <button class="btn btn-operate m-r-sm" translate ng-if="isWJ && !!item.platOrgId"
                                                ng-click="switchStopStatus(item, 0)"
                                                ng-disabled="item.bindFlag == 1"
                                                >启用</button>
                                            <button class="btn btn-operate m-r-sm" translate ng-if="isWJ && !!item.platOrgId"
                                                ng-click="switchStopStatus(item, 1)"
                                                ng-disabled="item.bindFlag == 0"
                                                >停用</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span ng-if="!itemCol.clickFn" >{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn" >
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"
                    yb-click="selectAll()"></div>
                <button class="btn btn-operate" ng-click="delData('batch')" ng-disabled="!btnPermission.clientDel"
                    translate translate-attr-title="{{!btnPermission.clientDel?'无权限执行此操作':''}}">删除</button>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <form name="form" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>客户名称</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="companyName" class="form-control" ng-model="detailInfo.companyName"
                            required yb-focus maxlength="200">
                    </div>
                    <div class="col-xs-4 msg-block"
                        ng-show="form.companyName.$dirty || (form.companyName.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.companyName.$error.required && !form.companyName.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>客户简称</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="shortName" class="form-control" ng-model="detailInfo.shortName"
                            maxlength="20">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i ng-if="isJCHK">*</i><span translate>客户编号</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="dealerCode" class="form-control" ng-model="detailInfo.dealerCode" maxlength="20" ng-required="isJCHK">
                    </div>
                    <div class="col-xs-4 msg-block" ng-show="form.dealerCode.$dirty || (form.dealerCode.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.dealerCode.$error.required && !form.dealerCode.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>客户分类</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div ng-model="dealerClass" dealer-class-selector></div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>客户分级</span>：</label>
                    <div class="col-xs-5 wrapper-none">

                        <select class="form-control" ng-model="detailInfo.dealerLevelId"
                            ng-options="item.id as item.levelName for item in detailInfo.clientLevelOption">
                            <option value="" translate>请选择</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>所属部门</span>：</label>
                        <div class="col-xs-5 wrapper-none" department-selector ng-model="dataSelected.department"></div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>地址</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="address" class="form-control" ng-model="detailInfo.address"
                            maxlength="200">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>联系人</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="contact" class="form-control" ng-model="detailInfo.contact"
                            maxlength="40">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>联系方式</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="detailInfo.contactTel" ng-if="isJCHK">
                        <input type="text" name="contactTel" class="form-control" ng-model="detailInfo.contactTel" yb-contact yb-focus ng-if="!isJCHK">
                    </div>
                    <div class="col-xs-4 msg-block"
                        ng-show="form.contactTel.$dirty || (form.contactTel.$invalid&&submitted)">
                        <div class="error-msg" ng-show="form.contactTel.$error.contactInfo && !form.contactTel.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>请输入正确的手机号码或电话号码</span>
                        </div>
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>传真</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="fax" class="form-control" ng-model="detailInfo.fax" maxlength="15">
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>邮编</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="zip" class="form-control" ng-model="detailInfo.zip" maxlength="15">
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>价格组</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" readonly="readonly" name="priceGroup" class="form-control"
                            ng-model="detailInfo.priceGroup" maxlength="15">
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>税率</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="taxRate" class="form-control" ng-model="detailInfo.taxRate"
                            yb-number-input disable-decimal="false" decimal-places="4" max="9999999.99">
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>是否大客户</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.bigClientFlag" value="1"
                            yb-radio-name="是">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.bigClientFlag" value="0"
                            yb-radio-name="否">
                    </label>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>是否查看库存</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isStorage" value="1"
                            yb-radio-name="是">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isStorage" value="0"
                            yb-radio-name="否">
                    </label>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>是否进出口查询价</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.jckPriceFlag" value="1"
                            yb-radio-name="是">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.jckPriceFlag" value="0"
                            yb-radio-name="否">
                    </label>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>是否竞品客户</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isCompetingDealer" value="1"
                            yb-radio-name="是">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isCompetingDealer" value="0"
                            yb-radio-name="否">
                    </label>
                </div>
                <div class="form-group m-b-sm" ng-if="isWJ">
                    <label class="col-xs-2 control-label"><span translate>是否区域库代理商</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isAreaWarehouseDealer" value="1"
                            yb-radio-name="是">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isAreaWarehouseDealer" value="0"
                            yb-radio-name="否">
                    </label>
                </div>      
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>是否零件配置客户</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isConfigMaterials" value="1"
                            yb-radio-name="是">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.isConfigMaterials" value="0"
                            yb-radio-name="否">
                    </label>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>客户状态</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.normalFlag" value="1"
                            yb-disabled="tabFlag.type==1&&!!detailInfo.normalFlagOld" yb-radio-name="正常维护">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="detailInfo.normalFlag" value="2"
                            yb-disabled="tabFlag.type==1&&!!detailInfo.normalFlagOld" yb-radio-name="已流失">
                    </label>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>直投达标金额</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="directLimit" class="form-control" ng-model="detailInfo.directLimit"
                            yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                    </div>
                </div>

                <div class="form-group" ng-if="isJCHK">
                    <label class="col-xs-2 control-label"><span translate>客户税号</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="taxCode" class="form-control" ng-model="detailInfo.taxCode"
                            maxlength="100">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>所属区域</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="detailInfo.area" maxlength="15">
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>加价比例</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="detailInfo.raisePriceScale"
                            yb-number-input disable-decimal="false" decimal-places="6" max="999999999.999999">
                    </div>
                </div>
                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>前移仓库</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div yb-form-clear ng-model="detailInfo.forwardWarehouseCode"
                            select-obj="selectWarehouse()" clear-form="clearWarehouse()" tips-name="前移仓库"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)" translate>保存</button>
                        <button type="button" class="btn btn-default" ng-click="changeTab(0)" translate>取消</button>
                    </div>
                </div>
            </form>
        </div>
        <div tab heading="绑定" active="activeFlag[2]" ng-if="activeFlag[2]">
            <div class="main-area d-t-35 d-b-60">
                <form name="boundForm" class="main-wrap form-horizontal single-col p-t-md clearfix" novalidate>
                    <div class="form-group border-b p-b-md">
                        <label class="col-xs-2 control-label"><i>*</i><span translate>邀请码</span>：</label>
                        <div class="col-xs-4 wrapper-none">
                            <input type="text" name="invitationCode" class="form-control"
                                ng-model="boundObj.invitationCode" required yb-focus>
                        </div>
                        <div class="col-xs-1 wrapper-none p-l-sm">
                            <button class="btn btn-primary w-full" ng-click="getInfo(boundForm.$valid)" translate>搜索</button>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="boundForm.invitationCode.$dirty || (boundForm.invitationCode.$invalid && submitted)">
                            <div class="error-msg"
                                ng-if="boundForm.invitationCode.$error.required && !boundForm.invitationCode.focused">
                                <i class="yb-icon ico-times-circular"></i><span translate>请输入合法的邀请码</span>
                            </div>
                        </div>
                    </div>
                    <div ng-if="!!orgInfo.orgId">
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>组织机构代码</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.orgCode}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>企业名称</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.companyName}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>企业简称</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.shortName}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>渠道</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.channelDesc}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>地址</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.address||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>联系人</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.contact||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>联系电话</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.contactTel||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>传真</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.fax||'-'}}
                            </label>
                        </div>
                        <div class="form-group m-b-none">
                            <label class="col-xs-2 control-label"><span translate>创建日期</span>：</label>
                            <label class="col-xs-8 control-label text-left spill-dots">
                                {{orgInfo.createDate|YbDate}}
                            </label>
                        </div>
                    </div>
                </form>
            </div>
            <div class="bottom-area btn-bar single-col border-t clearfix">
                <button type="button" class="btn btn-primary m-r-sm" ng-disabled="!orgInfo.orgId" translate
                    ng-click="doBound(boundForm.$valid)">绑定</button>
                <button type="button" class="btn btn-default" ng-click="changeTab(0)" translate>取消</button>
            </div>
        </div>
        <div tab heading="收货地址列表" active="activeFlag[3]" ng-if="activeFlag[3]">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="receiveInfoAddData()" translate>新增</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="receiveInfoSearch()"
                            translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="收货人"
                            ng-model="receiveInfoCondition.receiverName">
                        <span class="input-group-addon cursor-pointer" ng-click="receiveInfoSearch(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="receiveInfoSearch(1)"
                reset-data="receiveInfoReset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>收货地址</span>：</label>
                        <input type="text" name="dealerCode" ng-model="receiveInfoCondition.address"
                            class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>联系方式</span>：</label>
                        <input type="text" name="dealerCode" ng-model="receiveInfoCondition.phone" class="form-control">
                    </div>
                </div>
            </div>

            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{receiveInfoTbConf.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in receiveInfoTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(receiveInfoTbConf.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="receiveInfoTbConf.fixedWidth"
                                            fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="receiveInfoTbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{receiveInfoTbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in receiveInfoTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-click="toSort(receiveInfoTbConf.tableCol, $index)"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol"
                                            target-width="receiveInfoTbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y">
                        <table class="table-fixed border-none" width="{{receiveInfoTbConf.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in receiveInfoDataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in receiveInfoTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button class="btn btn-operate m-r-xs" translate
                                                ng-click="delReceiveInfoData(item.id)">删除</button>
                                            <button class="btn btn-operate" translate
                                                ng-click="updateReceiveInfoData(item.id)">编辑</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-style="receiveInfoTbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{receiveInfoTbConf.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in receiveInfoDataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.cueRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots"
                                        ng-repeat="itemCol in receiveInfoTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="receiveInfoPageInfo" yb-refresh="receiveInfoSearch()"></div>
            </div>
        </div>
        <div tab heading="{{receiveInfoTabFlag.name}}" active="activeFlag[4]" ng-if="activeFlag[4]">
            <form name="form" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>收货人</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="receiverName" class="form-control" ng-model="receiveInfo.receiverName"
                            required yb-focus maxlength="20">
                    </div>
                    <div class="col-xs-4 msg-block"
                        ng-show="form.receiverName.$dirty || (form.receiverName.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.receiverName.$error.required && !form.receiverName.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>收货地址</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="receiverAddress" class="form-control" ng-model="receiveInfo.address"
                            maxlength="200">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>联系方式</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="receiverTel" class="form-control" ng-model="receiveInfo.phone"
                            maxlength="20" yb-contact yb-focus>
                    </div>
                    <div class="col-xs-4 msg-block"
                        ng-show="form.receiverTel.$dirty || (form.receiverTel.$invalid&&submitted)">
                        <div class="error-msg"
                            ng-show="form.receiverTel.$error.contactInfo && !form.receiverTel.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>请输入正确的手机号码或电话号码</span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-primary m-r-sm" ng-click="receiveInfoSaveData(form.$valid)" translate>保存</button>
                        <button type="button" class="btn btn-default" ng-click="cancelSaveData()" translate>取消</button>
                    </div>
                </div>
            </form>
        </div>
        <div tab heading="客户车辆管理" active="activeFlag[5]" ng-if="activeFlag[5]">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addVeh()" ng-disabled="!btnPermission.clientVehicleAdd"
                        translate translate-attr-title="{{!btnPermission.clientVehicleAdd?'无权限执行此操作':''}}">新增</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="getMaintenVehList()"
                            translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" yb-download download-url="exportParam.allUrl"
                            download-param="vehCondition" class="btn btn-default base-color" translate translate-attr-title="导出">
                            <i class="yb-icon ico-export-o"></i>
                        </button>
                    </div>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="车号"
                            ng-model="vehCondition.carNo">
                        <span class="input-group-addon cursor-pointer" ng-click="getMaintenVehList(1)" translate>搜索</span>
                    </div>
                </div>
            </div>


            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{vehTbConf.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th class="border-r-none" ng-repeat="itemCol in vehTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="vehTbConf.fixedWidth"
                                            fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="{'left': vehTbConf.fixedWidth+'px'}">
                        <table class="table-fixed border-none" width="{{vehTbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in vehTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="vehTbConf.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y">
                        <table class="table-fixed border-none" width="{{vehTbConf.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in maintenVehList track by $index">
                                    <td class="spill-dots border-l-none border-r-none"
                                        ng-repeat="itemCol in vehTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="font-0" ng-if="itemCol.type === 'operate'">
                                            <button class="btn btn-operate m-r-xs" ng-click="editVehData(item)"
                                                ng-disabled="!btnPermission.clientEdit"
                                                translate translate-attr-title="{{!btnPermission.clientEdit?'无权限执行此操作':''}}">编辑</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="deleteVehData(item)"
                                                ng-disabled="!btnPermission.clientEdit"
                                                translate translate-attr-title="{{!btnPermission.clientEdit?'无权限执行此操作':''}}">删除</button>
                                            <button class="btn btn-operate m-r-xs" ng-click="stop(item.id)"
                                                ng-disabled="!btnPermission.clientEdit||item.isDisable===isOrNotEnum.Is"
                                                translate translate-attr-title="{{!btnPermission.clientEdit?'无权限执行此操作':''}}">停用</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-style="{'left': vehTbConf.fixedWidth+'px'}">
                        <table class="table-fixed border-none" width="{{vehTbConf.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in maintenVehList track by $index">
                                    <td class="spill-dots" ng-repeat="itemCol in vehTbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span
                                            ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                            ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="maintenVehList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="maintenVehPageInfo" yb-refresh="getMaintenVehList()"></div>
            </div>
        </div>

        <div tab heading="{{vehTabFlag.name}}" active="activeFlag[6]" ng-if="activeFlag[6]">
            <form name="vehForm" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>客户名称</span>：</label>
                    <div class="col-xs-5 wrapper-none" style="line-height: 34px">
                        {{vehObj.clientName}}
                    </div>
                </div>
                <div class="form-group" ng-if="vehTabFlag.type!==1">
                    <label class="col-xs-2 control-label"><span translate>品牌</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div dealer-dictionary-selector ng-model="vehObj.brandName" sel-key="BRAND"
                            sel-code="vehObj.brandCode">
                            <input type="text" name="brandName" class="form-control light-bg"
                                ng-model="vehObj.brandName" translate translate-attr-placeholder="请选择">
                        </div>
                    </div>
                </div>
                <div class="form-group" ng-if="vehTabFlag.type===1">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>品牌</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="brandName" class="form-control" ng-model="vehObj.brandName"
                            disabled="true">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>机型</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <select name="model" ng-model="vehObj.model" required class="form-control"
                            ng-disabled="vehTabFlag.type===1"
                            ng-options="item.modelName as item.modelName for item in modelList">
                            <option value="" translate>请选择机型</option>
                        </select>
                    </div>
                    <div class="col-xs-4 msg-block"
                        ng-show="vehForm.model.$dirty || (vehForm.model.$invalid && submitted)">
                        <div class="error-msg" ng-if="vehForm.model.$error.required && !vehForm.model.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>车号</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="carNo" class="form-control" required yb-focus ng-model="vehObj.carNo"
                            maxlength="50" ng-disabled="vehTabFlag.type===1">
                    </div>
                    <div class="col-xs-4 msg-block"
                        ng-show="vehForm.carNo.$dirty || (vehForm.carNo.$invalid && submitted)">
                        <div class="error-msg" ng-if="vehForm.carNo.$error.required && !vehForm.carNo.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>整机赠送额度（保养）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="maintenanceSendAmount" class="form-control"
                            ng-model="vehObj.maintenanceSendAmount" yb-number-input disable-decimal="false"
                            decimal-places="2" ng-disabled="vehTabFlag.type===1" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm" ng-if="vehTabFlag.type===1">
                    <label class="col-xs-2 control-label"><span translate>本次增加整机赠送额度（保养）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="maintenanceUpdateAmount" class="form-control"
                            ng-model="vehObj.maintenanceUpdateAmount" yb-number-input disable-decimal="false"
                            decimal-places="2" max="9999999.99" ng-change="changeMaintenance()">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>整机赠送额度（通用）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="universalSendAmount" class="form-control"
                            ng-model="vehObj.universalSendAmount" yb-number-input disable-decimal="false"
                            decimal-places="2" ng-disabled="vehTabFlag.type===1" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm" ng-if="vehTabFlag.type===1">
                    <label class="col-xs-2 control-label"><span translate>本次增加整机赠送额度（通用）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="universalUpdateAmount" class="form-control"
                            ng-model="vehObj.universalUpdateAmount" yb-number-input disable-decimal="false"
                            decimal-places="2" max="9999999.99" ng-change="changeUniversal()">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>系统已用额度（保养）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="maintenanceUseAmount" class="form-control"
                            ng-model="vehObj.maintenanceUseAmount" yb-number-input ng-disabled="vehTabFlag.type===1"
                            disable-decimal="false" decimal-places="2" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>初始已用额度（保养）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="maintenanceUseAmount" class="form-control"
                            ng-model="vehObj.initialMaintenanceUseAmount" yb-number-input disable-decimal="false"
                            decimal-places="2" ng-change="changeInitialMaintenance()" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>系统已用额度（通用）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="universalUseAmount" class="form-control"
                            ng-model="vehObj.universalUseAmount" yb-number-input ng-disabled="vehTabFlag.type===1"
                            disable-decimal="false" decimal-places="2" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>初始已用额度（通用）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="universalUseAmount" class="form-control"
                            ng-model="vehObj.initialUniversalUseAmount" yb-number-input disable-decimal="false"
                            decimal-places="2" ng-change="changeInitialUniversa()" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>剩余额度（保养）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="maintenanceLaveAmount" class="form-control"
                            ng-model="vehObj.maintenanceLaveAmount" yb-number-input ng-disabled="vehTabFlag.type===1"
                            disable-decimal="false" decimal-places="2" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>剩余额度（通用）</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="universalLaveAmount" class="form-control"
                            ng-model="vehObj.universalLaveAmount" yb-number-input ng-disabled="vehTabFlag.type===1"
                            disable-decimal="false" decimal-places="2" max="9999999.99">
                    </div>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>是否停用</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="vehObj.isDisable" value="1"
                            yb-radio-name="是">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="vehObj.isDisable" value="0"
                            yb-radio-name="否">
                    </label>
                </div>

                <div class="form-group m-b-sm">
                    <label class="col-xs-2 control-label"><span translate>保修状态</span>：</label>
                    <label class="col-xs-5 control-label p-l-n text-left clearfix">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="vehObj.warrantStatus" value="1"
                            yb-radio-name="在保">
                        <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="vehObj.warrantStatus" value="2"
                            yb-radio-name="出保">
                    </label>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>备注</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="vehObj.remark" maxlength="400">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-primary m-r-sm" ng-click="saveVehData(vehForm.$valid)" translate>保存</button>
                        <button type="button" class="btn btn-default" ng-click="changeTab(5)" translate>取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
